#ifndef INCLUDED_PLAYBACKSYSTEM_H
#define INCLUDED_PLAYBACKSYSTEM_H

//====================================================================================================
// Filename:	PlaybackSystem.h
// Created by:	Peter Chan
// Description:	Class for a key capturing/playback system.
//====================================================================================================

//====================================================================================================
// Includes
//====================================================================================================

#include <SGE.h>
using namespace SGE;

//====================================================================================================
// Class Declarations
//====================================================================================================

class PlaybackSystem
{
public:
	PlaybackSystem();
	~PlaybackSystem();

	void Reset(bool capture);

	void BeginFrame();
	void EndFrame();

	void RecordKey(int key);

	bool IsCapturing() const;
	bool IsKeyPressed(int key);

private:
	struct FrameData
	{
		std::vector<int> keys;
	};

	std::vector<FrameData> mFrameData;

	FrameData mCurrentFrameData;
	int mCurrentFrame;
	bool mCapture;
};

#endif // #ifndef INCLUDED_PLAYBACKSYSTEM_H